﻿
Public Class XWackyParceError
    Inherits System.Exception

    Protected mnumTextPosition As Int32

    Public Sub New()
        MyBase.New()
        mnumTextPosition = -1
    End Sub

    Public Sub New(message As String)
        MyBase.New(message)
        mnumTextPosition = -1
    End Sub

    Public Sub New(message As String, textPosition As Int32)
        MyBase.New(String.Format(message & " At pos {0}", textPosition))
    End Sub

    Public Sub New(message As String, textPosition As Int32, innerException As System.Exception)
        MyBase.New(String.Format(message & " At pos {0}", textPosition), innerException)
    End Sub

    Public ReadOnly Property TextPosition As Int32
        Get
            Return mnumTextPosition
        End Get
    End Property
End Class

Public Class XWackyParcerTreeInvalid
    Inherits System.Exception

    Public Sub New()
        MyBase.New()
    End Sub

    Public Sub New(message As String)
        MyBase.New(message)
    End Sub

    Public Sub New(message As String, innerException As System.Exception)
        MyBase.New(message, innerException)
    End Sub
End Class
